﻿using CPPEI.Coolzon.Data;
using CPPEI.Coolzon.Data.MainServiceData;
using CPPEI.Coolzon.Service.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.Coolzon.Service
{
    /// <summary>
    /// 主服务
    /// </summary>
    [ServiceContract(CallbackContract = typeof(IMainServiceCallback))]
    public interface IMainService
    {
        /// <summary>
        /// 发送事件到服务器
        /// </summary>
        /// <param name="header"></param>
        /// <param name="content"></param>
        [OperationContract(IsOneWay = true)]
        void SendRequest(Request request);

        /// <summary>
        /// 执行请求，直接返回处理结果
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [OperationContract]
        Response ExecuteRequest(Request request);
    }
}
